package com.omybug.study.entity;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 
 * </p>
 *
 * @author oMyBug
 * @since 2018-09-04
 */
public class Book extends BaseModel<Book> {

    @NotNull(groups = {Create.class})
    private Integer categoryId;

    @NotNull(groups = {Create.class})
    private String name;

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Book{" +
        "id=" + getId() +
        ", categoryId=" + getCategoryId() +
        ", name=" + getName() +
        ", createdAt=" + getCreatedAt() +
        ", updatedAt=" + getUpdatedAt() +
        "}";
    }



}
